﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using Openapi.Weibo.Model;

namespace Sample.Mvc3.Controllers
{
    public class ControllerBase : Controller
    {
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (Request.IsAuthenticated)
            {
                //FormsAuthentication.SetAuthCookie(CurrentToken.uid, false /* createPersistentCookie */);
                if (Session["UserInfo"]!=null)
                {
                    ViewBag.UserName = (Session["UserInfo"] as Models.UserinfoModel).UserName;
                }
            }
            base.OnActionExecuting(filterContext);
        }
    }

    public class AsyncControllerBase : AsyncController
    {
 
    }
}
